package com.wgchao.identityrightsmanagement.infrastructure.jpa.repository;

import com.wgchao.identityrightsmanagement.infrastructure.jpa.entity.SysPermissionOffice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysPermissionOfficeRepository extends JpaRepository<SysPermissionOffice, Long> {
    SysPermissionOffice findFirstByMenuMarkAndOfficeCode(String menuMark, String officeCode);
    List<SysPermissionOffice> findAllByOfficeCodeAndDepartmentCodeAndProMarkOrderByMenuMark(String officeCode, String departmentCode, String proMark);
    List<SysPermissionOffice> findAllByDepartmentCode(String departmentCode);
    List<SysPermissionOffice> findAllByOfficeCode(String officeCode);
    List<SysPermissionOffice> findAllByDepartmentCodeAndOfficeCodeNotIn(String departmentCode, List<String> officeCodes);
}
